<template>
	<view class="particulars">
		<view class="map" v-if="repairsObj.status === 2">
			<map></map>
		</view>
		<repairs-details :repairsObj="repairsObj"></repairs-details>
		<view class="box" v-if="repairsObj.status === 1">

		</view>
		<view class="btnbox" v-if="repairsObj.status === 1">
			<view class="left">
				<text>修改信息</text>
			</view>
			<view class="right">
				<text>取消报修</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getRepairsMessage
	} from '@/api/repairs.js'
	export default {
		data() {
			return {
				id: '',
				repairsObj: {}
			};
		},
		methods: {
			async getRepairsMessage() {
				const res = await getRepairsMessage(this.id)
				this.repairsObj = res.data
			}
		},
		onLoad(options) {
			this.id = options.id
			this.getRepairsMessage()

		}

	}
</script>

<style lang="scss">
	.particulars {
		background: #FAFAFA;

		.map {
			width: 750rpx;
			height: 440rpx;
			background: pink;

			map {
				width: 100%;
				height: 100%;
			}
		}

		.box {
			height: 240rpx;
			width: 100%;
		}
	}



	::v-deep .u-form-item__body {
		height: 62rpx;
	}

	.btnbox {
		width: 750rpx;
		height: 213rpx;
		background: #fff;
		display: flex;
		position: fixed;
		bottom: 0;
		left: 0;

		.left,
		.right {
			flex: 1;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 30rpx;
		}

		.left {
			color: #5591AF;

		}

		.right {
			color: #686868;

		}
	}
</style>
